package com.cma.cmabackend.controller;

import com.cma.cmabackend.service.LoginService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/login")
public class LoginController {
    @Resource
    LoginService loginService;

    @PostMapping("")
    public Map<String, Object> doLogin(String username, String pwd) {
        return loginService.validate(username, pwd);
    }
}
